\documentclass[10pt,a4paper]{article} 

\usepackage{ctex} % 中文支持
\usepackage[top=2.5cm, bottom=2.5cm, left=2.5cm, right=2.5cm]{geometry} % 页边距
\usepackage{amsmath, amssymb} % 数学公式与符号
\usepackage{graphicx}
\usepackage{pythonhighlight}
\usepackage{url} 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{titling}
\setlength{\droptitle}{-2cm} % 标题上移

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 使表格美观
\usepackage{array}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}
\setlength\extrarowheight{3pt}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%文档的题目、作者与日期
\author{221330100 WLQ }
\title{方差分析-回归分析-聚类分析-判别分析-习题 }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\maketitle

%\begin{abstract}
%练习
%\end{abstract}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\setcounter{tocdepth}{2}
%\renewcommand\contentsname{目录}
%
%\renewcommand {\baselinestretch} {1.3}\normalsize 
%\tableofcontents 
%\renewcommand {\baselinestretch} {1.0}\normalsize


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\section{}
\begin{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item  %1
设有分组数据如表所示。
\begin{table}[ht!]\centering
\caption{分组数据} \vspace{0.1cm}
\begin{tabular}{|M{1cm}|M{2cm}|M{2cm}|M{2cm}|M{2cm}|M{2cm}|}\hline
A组 & $x_{11}=11$ & $x_{12}=12$ & $x_{13}=13$ & $x_{14}=14$ & $x_{15}=15$  \\ \hline 
B组 & $x_{21}=21$ & $x_{22}=22$ & $x_{23}=23$ & $x_{24}=24$ & $x_{25}=25$  \\ \hline 
C组 & $x_{31}=31$ & $x_{32}=32$ & $x_{33}=33$ & $x_{34}=34$ & $x_{35}=35$  \\ \hline 
\end{tabular}
\end{table}

\begin{enumerate}
\item  计算总离差平方和 $S_T$, 组间平方和 $S_A$ 和 组内平方和 $S_E$. 
\item  证明 $S_T = S_A + S_E$. 
\end{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vspace{0.5cm}
解答：






%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\item  %2 
设矩阵 $X,Y$ 如下， 
\begin{eqnarray}
X= \begin{bmatrix} 1&1 \\ 1&2 \\ 1&3 \\ 1&4 \\ \end{bmatrix}, \,\,\, 
Y= \begin{bmatrix} 6 \\ 4 \\ 5 \\ 7 \end{bmatrix}. 
\end{eqnarray}
计算 $(X^tX)^{-1}X^tY$. 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vspace{0.5cm}
解答：








%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\item  %3
在对某一新药的研究中，记录了不同剂量($x$)下有副作用的人数的比例($p$), 具体如表所示。
\begin{table}[ht!]\centering
\caption{剂量与副作用数据} \vspace{0.1cm}
\begin{tabular}{|c|c|c|c|c|c|c|c|}\hline
$x$ & 0.9 & 1.1 & 1.8 & 2.3 & 3.0 & 3.3 & 4.0  \\ \hline 
$p$ & 0.37 & 0.31 & 0.44 & 0.60 & 0.67 & 0.81 & 0.79 \\ \hline 
\end{tabular}
\end{table}

\begin{enumerate}
\item  作出散点图。
\item  建立 $p$ 关于 $x$ 的一元线性回归方程。
\item  建立 $p$ 关于 $x$ 的 Logistic 回归方程。
\end{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vspace{0.5cm}
解答：








%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\item  %4
设四个对象之间的两两距离保存在下述矩阵中。
\begin{eqnarray}
D_{(0)} = \begin{bmatrix} 
0&3&4&5 \\ 
3&0&1&2 \\ 
4&1&0&4 \\ 
5&2&4&0 \\ 
\end{bmatrix}
\end{eqnarray}
使用最短距离对这四个对象进行聚类分析。
\begin{enumerate}
\item  得到的矩阵 $D_{(1)}$ 和 $D_{(2)}$ 分别是什么？
\item  画出聚类树图。
\end{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vspace{0.5cm}
解答：








%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\item  %5
设二维随机变量 $(X_1,X_2)$ 服从二维正态分布 $N(\mu_1,\mu_2,\sigma_1^2,\sigma_2^2,\rho)$. 
求随机变量 $Y=a_1X_1+a_2X_2$ 的均值与方差。

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vspace{0.5cm}
解答：









%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\item  %6
求 $(a_1,a_2)$ 的值，使得下述函数达到最大值，
\begin{eqnarray}
f(a_1,a_2) = \frac{\left(\begin{bmatrix} a_1 & a_2\end{bmatrix} \begin{bmatrix} 6 \\ 7 \end{bmatrix} \right)^2}
{\begin{bmatrix} a_1 & a_2\end{bmatrix} \begin{bmatrix} 3&2 \\ 2&5 \end{bmatrix} \begin{bmatrix}a_1 \\ a_2 \end{bmatrix} }. 
\end{eqnarray}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vspace{0.5cm}
解答：








%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

